<include file="Public/head"/>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>
    <include file="Public/sidebarstu"/>
    <div class="main-content">
        <div class="main-content-inner">
        <!-- 横向菜单 -->
           <include file="Public/stutopsidebar"/>
            <div class="page-content">
                 
                <div class="row">
                    <div class="widget-box ui-sortable-handle" style="opacity: 1; z-index: 0;">
                        <div class="widget-header">
                            <h5 class="widget-title">数据处理</h5>
							
                            <!-- #section:custom/widget-box.toolbar -->
                            

                            <!-- /section:custom/widget-box.toolbar -->
                        </div>
                        <form action="{:U('Udel')}" method="post" id="myform">
                        <div class="row">
										<div class="cf col-xs-12 col-lg-6">
											<a class="btn btn-info " href="JavaScript:void(0)" id="jyxxadd" onclick="jyxxadd()">新增</a>
											<a id="submit" class="btn btn-info"  value="删除">删除</a>
											<a class="btn btn-success " href="{:U('jyxxexportxsstpl')}" value="">模板下载</a>
											<a class="btn btn-success " href="{:U('addexcel',array('table'=>'jyxx'))}" value="">数据导入</a>
											<!-- <a class="btn btn-danger " href="{:U('jyxxrint/index')}" value="">批量打印</a> -->
										</div>

										<div class="input-group col-xs-10 col-lg-5">
											<span class="input-group-addon " href="#">
												<i class="ace-icon fa fa-search"></i>
											</span>

											<input type="text" class="form-control" placeholder="搜索内容"  id="searchkey">
											<span class="input-group-addon btn-app btn-warning" id="search">
												查询
											</span>
											
										</div>
									</div>
								
								
								
                        <div class="widget-body">
                            <div class="widget-main">
								 
								
                              
                                
                            </div>
                             <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                <th>院系代码</th>
                                <th>班级号码</th>
                                <th>学号</th>
                                <th>姓名</th>
                                <th>性别代码</th>
                                <th>学历代码</th>
                                <th>专业代码</th>
                                <th>入学时间</th>
                                <th>出生日期</th>
                                <th>民族代码</th>
                                <th>政治面貌代码</th>
                                <th>家庭地址</th>
                                <th>家庭联系电话</th>
                                <th>身份证号码</th>
                                <!-- <th>培养方式代码</th>
                                <th>学制</th>
                                <th>是否师范标志</th>
                                <th>联系方式</th>
                                <th>录简表页行</th>
                                <th>高考成绩</th>
                                <th>高考专业课成绩</th>
                                <th>考生号</th>
                                <th>生源地区代码</th>
                                <th>身份证证所在地</th>
                                <th>学习形式</th>
                                <th>预毕业时间</th>
                                <th>教育部学籍状态</th>
                                <th>院系审核状态</th>
                                <th>学校审核状态</th> -->
                                <th style="width:100px;">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="jyxx" id="val">
                                <tr data-info='{$val.xh}' id="{$val.xh}">
                                	<td class="center"><input class="aids" type="checkbox" name="ids[]" value="{$val['xh']}" ></td>
                                    <td>{$val['xdm']|academy}</td>
                                    <td>{$val['bjhm']}</td>
                                    <td>{$val['xh']}</td>
                                    <td>{$val['xm']}</td>
                                    <td><if condition="$val[xbdm] eq '1' ">男<elseif condition="$val[xbdm] eq '2'" /> 女</if></td>
                                    <td>{$val['xldm']|xldm}</td>
                                    <td>{$val['zydm']|zydm}</td>
                                    <td>{$val['rxsj']}</td>
                                    <td>{$val['csrq']}</td>
                                    <td>{$val['mzdm']|mzdm}</td>
                                    <td>{$val['zzmmdm']|zzmmdm}</td>
                                    <td>{$val['jtdz']}</td>
                                    <td>{$val['jtlxdh']}</td>
                                    <td>{$val['sfzhm']}</td>
                                    <!-- <td>{$val['pyfsdm']}</td>
                                    <td>{$val['xz']}</td>
                                    <td>{$val['sfsfbz']}</td>
                                    <td>{$val['lxfs']}</td>
                                    <td>{$val['lqyh']}</td>
                                    <td>{$val['gkcj']}</td>
                                    <td>{$val['gkzykcj']}</td>
                                    <td>{$val['ksh']}</td>
                                    <td>{$val['syszddm']}</td>
                                    <td>{$val['sfzszd']}</td>
                                    <td>{$val['xxxs']}</td>
                                    <td>{$val['yjbysj']}</td>
                                    <td>{$val['jybzcdm']}</td>
                                    <td>{$val['yxshzt']}</td>
                                    <td>{$val['xxshzt']}</td> -->
                                    <td><a class="btn btn-info btn-minier" href="JavaScript:void(0)"  id="jyxxedit" onclick="jyxxedit({$val.xh})">修改</a>&nbsp;<a class="btn btn-danger btn-minier" href="{:U('jyxxdel',array('ids'=>$val['xh']))}" onclick=" if(confirm('您确定要删除选中的数据吗？')) {return ture;}else{return false;}" >删除&nbsp;</a></td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        {$page}
                        </div>
                        </form>
                    </div>               
                </div>
            </div><!-- /.page-content -->
            <include file="Public/set"/>
        </div>
    </div><!-- /.main-content -->
     <div class="modal fade" tabindex="-1" role="dialog" id="formdialog">
     </div>
     <div class="modal fade" tabindex="-1" role="dialog" id="formdialogadd">
 <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">学生用户信息管理</h4>
      </div>
      <div class="modal-body">   
				<form class="form-horizontal" id="USformadd">
											
							  <div class="form-group">
				    <label for="inputEmail3" class="col-sm-2 control-label">院系代码</label>
				    <div class="col-sm-8">
				      <input type="text" class="form-control" name="XDM" id="xdm" value="{$user.xdm}">
				    </div>
				  </div>
				  <div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">班级号码</label>
				    <div class="col-sm-8">
				      <input type="text" class="form-control"  name="BJHM"  value="{$user.bjhm}">
				    </div>
				  </div>  
				  <div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">学号</label>
				    <div class="col-sm-8">
				      <input type="text" class="form-control"  name="XH" value="{$user.xh}">
				    </div>
				  </div> 
				  <div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">姓名</label>
				    <div class="col-sm-8">
				      <input type="text" class="form-control"  name="XM" value="{$user.xm}">
				    </div>
				  </div> 
				  <div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">性别</label>
				    <div class="col-sm-8">
				      <input type="text" class="form-control"  name="XBDM" value="{$user.xbdm}">
				    </div>
				  </div> 
				  <div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">身份证证所在地</label>
				    <div class="col-sm-8">
				      <input type="text" class="form-control"  name="SFZHM"  value="{$user.sfzhm}">
				    </div>
				  </div> 
				  <div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">考生号</label>
				    <div class="col-sm-8">
				      <input type="text" class="form-control"  name="ksh"  value="{$user.ksh}">
				    </div>
				  </div>
				</form>
      
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" id="close" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" onclick="add_save()">保存信息</button> 
      </div>
    </div>
  </div>
</div>

    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>

<!-- inline scripts related to this page -->
<script type="text/javascript">
		$(function(){
			///页面内部导航
			var thisdh='<li class="active"><a href="{:U('Qwadmin/'. session('description').'/id/'.session('flid') )}" title="点击显示列表">{$dazfl}</a></li>';
			$(".breadcrumb").append(thisdh);
			////////////全选
			$(".check-all").click(function(){
				$(".aids[disabled!=disabled]").prop("checked", this.checked);
			});
			$(".aids").click(function(){
				var option = $(".ids");
				option.each(function(i){
					if(!this.checked){
						$(".check-all").prop("checked", false);
						return false;
					}else{
						$(".check-all").prop("checked", true);
					}
				});
			});
			//删除按钮动作；
			$("#submit").click(function(){
				var chk_ids =[]; 
                   $('input[name="ids[]"]:checked').each(function(){ 
                    chk_ids.push($(this).val()); 
                    }); 
                if(chk_ids.length==0){
                       bootbox.alert("你还没有选择任何内容，请返回选择！");
                }
                else{
                     bootbox.confirm({
					 title: "系统提示",
					 message: "你确定要删除所选内容吗？", 
					 callback:function(result){
						if(result){
							$("#myform").submit();
						}
					},
					buttons: {
						"cancel" : {"label" : "取消"},
						"confirm" : {
								"label" : "确定",
								"className" : "btn-danger"
							}
					}
				});

                }				
			});

       /////////////单个删除
			$(".del").click(function(){
				var url = $(this).attr('val');
                $(this).parents('tr').find("input").prop("checked",true);
				bootbox.confirm({
					title: "系统提示",
					message: "是否要该档案？", 
					callback:function(result){
						if(result){
							$("#myform").submit();
						}
					},
					buttons: {
						"cancel" : {"label" : "取消"},
						"confirm" : {
								"label" : "确定",
								"className" : "btn-danger"
							}
					}
				});
			});
       


		});

  //弹出框调用模式
  
	  $('#jyxxadd').on('click',function(){
	  	   $('#formdialogadd').modal();
	  });

  function add_save(){ 
	  var aa=$('#USformadd').serialize();
	  var url="{:U('jyxxadd')}?"+aa;
	  $.post(url,{},function(result){
		    if(result=='1'){
		    	$("#close").trigger("click"); 
		    	window.location.reload(); 
		    }
		  });	
  }

  /*function Pedit(ids){ 

	  var aa=$('#USform').serialize();
	  var url="{:U('Pedit')}";
	  
	  $.post(url,{ids,ids},function(result){
		  	alert(result);
		  });
	  }*/
  
  
  function jyxxedit(id){
		  
	  	var url="/admin/Student/jyxxedit/id/"+id;
	  	$.post(url,{id:id},function(result){
	  		$('#formdialog').html(result);
	  		$('#formdialog').modal();
		  });
	}
		</script>
		
		
		


</body>
</html>